
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shezhi"></use>
                    </svg>
                    <div class="name">设置</div>
                    <div class="fontclass">#icon-shezhi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixin"></use>
                    </svg>
                    <div class="name">微信</div>
                    <div class="fontclass">#icon-weixin</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-gear"></use>
                    </svg>
                    <div class="name">设置</div>
                    <div class="fontclass">#icon-gear</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shouye"></use>
                    </svg>
                    <div class="name">首页</div>
                    <div class="fontclass">#icon-shouye</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-jungongcelianghuizong"></use>
                    </svg>
                    <div class="name">竣工测量汇总</div>
                    <div class="fontclass">#icon-jungongcelianghuizong</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-dizhi"></use>
                    </svg>
                    <div class="name">地址</div>
                    <div class="fontclass">#icon-dizhi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-iconman"></use>
                    </svg>
                    <div class="name">监理</div>
                    <div class="fontclass">#icon-iconman</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shoucang"></use>
                    </svg>
                    <div class="name">收藏</div>
                    <div class="fontclass">#icon-shoucang</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-yusuan"></use>
                    </svg>
                    <div class="name">预算</div>
                    <div class="fontclass">#icon-yusuan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shouru"></use>
                    </svg>
                    <div class="name">收入</div>
                    <div class="fontclass">#icon-shouru</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-1"></use>
                    </svg>
                    <div class="name">新房</div>
                    <div class="fontclass">#icon-1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icon7"></use>
                    </svg>
                    <div class="name">服务中心</div>
                    <div class="fontclass">#icon-icon7</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-fenlei"></use>
                    </svg>
                    <div class="name">分类</div>
                    <div class="fontclass">#icon-fenlei</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-fenlei1"></use>
                    </svg>
                    <div class="name">分类</div>
                    <div class="fontclass">#icon-fenlei1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-xiao46"></use>
                    </svg>
                    <div class="name">分类</div>
                    <div class="fontclass">#icon-xiao46</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zliconweibo01"></use>
                    </svg>
                    <div class="name">微博</div>
                    <div class="fontclass">#icon-zliconweibo01</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-dizhi1"></use>
                    </svg>
                    <div class="name">地址</div>
                    <div class="fontclass">#icon-dizhi1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weibo"></use>
                    </svg>
                    <div class="name">微博</div>
                    <div class="fontclass">#icon-weibo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-xianchangkaohe"></use>
                    </svg>
                    <div class="name">现场考核</div>
                    <div class="fontclass">#icon-xianchangkaohe</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-renwu"></use>
                    </svg>
                    <div class="name">任务</div>
                    <div class="fontclass">#icon-renwu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-renwu1"></use>
                    </svg>
                    <div class="name">任务</div>
                    <div class="fontclass">#icon-renwu1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-jzjc3"></use>
                    </svg>
                    <div class="name">环境监测</div>
                    <div class="fontclass">#icon-jzjc3</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-yanshou"></use>
                    </svg>
                    <div class="name">材料验收</div>
                    <div class="fontclass">#icon-yanshou</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-qietu08"></use>
                    </svg>
                    <div class="name">微信</div>
                    <div class="fontclass">#icon-qietu08</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-wuxing"></use>
                    </svg>
                    <div class="name">五星</div>
                    <div class="fontclass">#icon-wuxing</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zhifubao"></use>
                    </svg>
                    <div class="name">支付宝</div>
                    <div class="fontclass">#icon-zhifubao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-fenlei2"></use>
                    </svg>
                    <div class="name">分类</div>
                    <div class="fontclass">#icon-fenlei2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-3"></use>
                    </svg>
                    <div class="name">等级</div>
                    <div class="fontclass">#icon-3</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shuidian"></use>
                    </svg>
                    <div class="name">水电</div>
                    <div class="fontclass">#icon-shuidian</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zixun"></use>
                    </svg>
                    <div class="name">咨询</div>
                    <div class="fontclass">#icon-zixun</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zhangdan"></use>
                    </svg>
                    <div class="name">账单</div>
                    <div class="fontclass">#icon-zhangdan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icon"></use>
                    </svg>
                    <div class="name">等级</div>
                    <div class="fontclass">#icon-icon</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-jungongyanshou"></use>
                    </svg>
                    <div class="name">竣工验收</div>
                    <div class="fontclass">#icon-jungongyanshou</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-mys"></use>
                    </svg>
                    <div class="name">我的</div>
                    <div class="fontclass">#icon-mys</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weibo1"></use>
                    </svg>
                    <div class="name">微博</div>
                    <div class="fontclass">#icon-weibo1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-bangzhuzhongxin"></use>
                    </svg>
                    <div class="name">帮助中心</div>
                    <div class="fontclass">#icon-bangzhuzhongxin</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-dengji"></use>
                    </svg>
                    <div class="name">等级</div>
                    <div class="fontclass">#icon-dengji</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-guanjiaowangtubiao53"></use>
                    </svg>
                    <div class="name">咨询专家</div>
                    <div class="fontclass">#icon-guanjiaowangtubiao53</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shenhe"></use>
                    </svg>
                    <div class="name">审核</div>
                    <div class="fontclass">#icon-shenhe</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-woderenwu2"></use>
                    </svg>
                    <div class="name">任务</div>
                    <div class="fontclass">#icon-woderenwu2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shenhe1"></use>
                    </svg>
                    <div class="name">审核</div>
                    <div class="fontclass">#icon-shenhe1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-changjianwenti"></use>
                    </svg>
                    <div class="name">常见问题</div>
                    <div class="fontclass">#icon-changjianwenti</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zixun1"></use>
                    </svg>
                    <div class="name">咨询</div>
                    <div class="fontclass">#icon-zixun1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-xiaoxi"></use>
                    </svg>
                    <div class="name">消息</div>
                    <div class="fontclass">#icon-xiaoxi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-jungongyanshou1"></use>
                    </svg>
                    <div class="name">竣工验收</div>
                    <div class="fontclass">#icon-jungongyanshou1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shuidiancailiaoyanshou"></use>
                    </svg>
                    <div class="name">水电材料验收</div>
                    <div class="fontclass">#icon-shuidiancailiaoyanshou</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shuidiangongchengyanshou"></use>
                    </svg>
                    <div class="name">水电工程验收</div>
                    <div class="fontclass">#icon-shuidiangongchengyanshou</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shenhe2"></use>
                    </svg>
                    <div class="name">审核</div>
                    <div class="fontclass">#icon-shenhe2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-huanjing"></use>
                    </svg>
                    <div class="name">环境</div>
                    <div class="fontclass">#icon-huanjing</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-xiaoxi1"></use>
                    </svg>
                    <div class="name">消息</div>
                    <div class="fontclass">#icon-xiaoxi1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-cailiao"></use>
                    </svg>
                    <div class="name">材料</div>
                    <div class="fontclass">#icon-cailiao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-xinfang"></use>
                    </svg>
                    <div class="name">新房</div>
                    <div class="fontclass">#icon-xinfang</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-fangwufanxin"></use>
                    </svg>
                    <div class="name">房屋翻新</div>
                    <div class="fontclass">#icon-fangwufanxin</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shourutubiao-01"></use>
                    </svg>
                    <div class="name">收入</div>
                    <div class="fontclass">#icon-shourutubiao-01</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-tubiaozhizuomoban"></use>
                    </svg>
                    <div class="name">水电</div>
                    <div class="fontclass">#icon-tubiaozhizuomoban</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-huanjingjiance"></use>
                    </svg>
                    <div class="name">传感器_环境监测</div>
                    <div class="fontclass">#icon-huanjingjiance</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weixin-"></use>
                    </svg>
                    <div class="name">支付宝</div>
                    <div class="fontclass">#icon-weixin-</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#icon-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
    </div>
</body>
</html>
